package com.lisp.algorithm.graph;

import java.util.ArrayList;

public class ShortestPath {

    public static void main(String[] args) {
        int[][] graph = {
                {0, 7, 9, 0, 0, 14},
                {7, 0, 10, 15, 0, 0},
                {9, 10, 0, 11, 0, 2},
                {0, 15, 11, 0, 6, 0},
                {0, 0, 0, 6, 0, 9},
                {14, 0, 2, 0, 9, 0},
                };
        int source = 0;
        int[] prev = new int[graph.length];
        int[] distances = new int[graph.length];
        for(int i=1; i<graph.length; i++) {
            distances[i] = Integer.MAX_VALUE;
        }
    }
    
    private static void shortestPath(int[][] graph, int source, int[] distances, 
            int[] prev, ArrayList<Integer> notVisited, ArrayList<Integer> visited) {
        int v = 0;
        int[] neighbour = graph[source];
        int minDistance = Integer.MAX_VALUE;
        while(v < neighbour.length) {
            if(neighbour[v] < minDistance) {
                minDistance = neighbour[v];
                minDistance = v;
            }
        }
        
        
        for(int visitedV : visited) {
            if(graph[v][visitedV] > 0 && graph[v][visitedV] + distances[visitedV] < distances[visitedV]) {
                
            }
        }
        visited.add(v);
        notVisited.remove(Integer.valueOf(v));
    }
}
